package ooday05;

public class StaticFinalDome {
    public static void main(String[] args) {
        //1)加载Loo.class到方法区中
        //2)静态变量num一并存储到方法区中
        //3）到方法区中获取num值
        System.out.println(Loo.PI);
        System.out.println(Loo.COUNT);
        //Loo.PI = 3.1415926; //编译错误，常量不能被改变
    }
}
class Loo{
    public static final double PI = 3.14159;
    public static final int COUNT = 5;
    //public static final int NUM; //编译错误，常量必须声明同时初始化
}
